package com.softservecom.training.shop.pojos;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * UsersDetails entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "UsersDetails", schema = "dbo", catalog = "Java")
public class UsersDetails implements java.io.Serializable {

	// Fields

	private Integer userDetailsId;
	private Images images;
	private String firstName;
	private String lastName;
	private String address;
	private String EMail;
	private Byte male;
	private Integer rating;
	private String description;
	private Integer cityId;
	private Integer phoneId;
	private Set<Users> userses = new HashSet<Users>(0);

	// Constructors

	/** default constructor */
	public UsersDetails() {
	}

	/** minimal constructor */
	public UsersDetails(Integer userDetailsId, String firstName,
			String lastName, String address, String EMail, Byte male,
			Integer rating, Integer cityId, Integer phoneId) {
		this.userDetailsId = userDetailsId;
		this.firstName = firstName;
		this.lastName = lastName;
		this.address = address;
		this.EMail = EMail;
		this.male = male;
		this.rating = rating;
		this.cityId = cityId;
		this.phoneId = phoneId;
	}

	/** full constructor */
	public UsersDetails(Integer userDetailsId, Images images, String firstName,
			String lastName, String address, String EMail, Byte male,
			Integer rating, String description, Integer cityId,
			Integer phoneId, Set<Users> userses) {
		this.userDetailsId = userDetailsId;
		this.images = images;
		this.firstName = firstName;
		this.lastName = lastName;
		this.address = address;
		this.EMail = EMail;
		this.male = male;
		this.rating = rating;
		this.description = description;
		this.cityId = cityId;
		this.phoneId = phoneId;
		this.userses = userses;
	}

	// Property accessors
	@Id
	@Column(name = "UserDetailsID", unique = true, nullable = false)
	public Integer getUserDetailsId() {
		return this.userDetailsId;
	}

	public void setUserDetailsId(Integer userDetailsId) {
		this.userDetailsId = userDetailsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ImageID")
	public Images getImages() {
		return this.images;
	}

	public void setImages(Images images) {
		this.images = images;
	}

	@Column(name = "FirstName", nullable = false, length = 50)
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "LastName", nullable = false, length = 50)
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Column(name = "Address", nullable = false, length = 250)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "e-mail", nullable = false, length = 50)
	public String getEMail() {
		return this.EMail;
	}

	public void setEMail(String EMail) {
		this.EMail = EMail;
	}

	@Column(name = "Male", nullable = false)
	public Byte getMale() {
		return this.male;
	}

	public void setMale(Byte male) {
		this.male = male;
	}

	@Column(name = "Rating", nullable = false)
	public Integer getRating() {
		return this.rating;
	}

	public void setRating(Integer rating) {
		this.rating = rating;
	}

	@Column(name = "Description")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "CityID", nullable = false)
	public Integer getCityId() {
		return this.cityId;
	}

	public void setCityId(Integer cityId) {
		this.cityId = cityId;
	}

	@Column(name = "PhoneID", nullable = false)
	public Integer getPhoneId() {
		return this.phoneId;
	}

	public void setPhoneId(Integer phoneId) {
		this.phoneId = phoneId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usersDetails")
	public Set<Users> getUserses() {
		return this.userses;
	}

	public void setUserses(Set<Users> userses) {
		this.userses = userses;
	}

}